Eliminating Cycles in Weak Tables
نویسندگان
چکیده
Weak References constitute an elegant mechanism for an application to interact with its garbage collector. In most of its typical uses, weak references are used through weak tables (e.g., Java’s WeakHashMap). However, most implementations of weak tables have a severe limitation: Cyclic references between keys and values in weak tables prevent the elements inside a cycle from being collected, even if they are no longer reachable from outside. This ends up bringing difficulties to the use of weak tables in some kinds of applications. In this work, we present our approach for overcoming this problem in the context of the Lua programming language. Our approach consists of an adaptation of the ephemerons mechanism to tables. We modified the garbage collector of the Lua virtual machine in order to offer support to this mechanism. With this adapted garbage collector we could verify the efficiency and effectiveness of the implementation in solving the problem of cycles on weak tables in Lua.
منابع مشابه
Foreign Trade and International Financial Flows: Implications for Economic Stability in the Selected ECOWAS Countries
T his study investigates the effects of extra-ECOWAS merchandise trade and investment flows on the transmission of business cycles in the selected ECOWAS between 1985 and 2014. The study finds that total trade and foreign direct investment (FDI) significantly influence the transmission of business cycles with elasticities of 1.1 and 0.7, respectively in the long run. There are little vari...
متن کاملGlacial cycles triggered by burial carbon release
Introduction Conclusions References Tables Figures Back Close Full Screen / Esc Abstract Introduction Conclusions References Tables Figures Back Close Full Screen / Esc Printer-friendly Version Interactive Discussion EGU Abstract A new mechanism is proposed in which climate, carbon cycle and icesheets interact with each other to produce a feedback that can produce quasi-100 ky glacial-interglac...
متن کاملOn Paraconsistent Weak Kleene Logic and Involutive Bisemilattices - Part I
In his Introduction to Metamathematics [13, § 64], S.C. Kleene distinguishes between a “strong sense” and a “weak sense” of propositional connectives when partially defined predicates are present. Each of these meanings is made explicit via certain 3-valued truth tables, which have become widely known as strong Kleene tables and weak Kleene tables, respectively. If the elements of the base set ...
متن کاملRevisiting the welfare effects of eliminating business cycles
We investigate the welfare effects of eliminating business cycles in a model with substantial consumer heterogeneity. The heterogeneity arises from uninsurable and idiosyncratic uncertainty in preferences and employment status. We calibrate the model to match the distribution of wealth in U.S. data and features of transitions between employment and unemployment. In comparison with much of the l...
متن کاملOn the Welfare Effects of Eliminating Business Cycles
We investigate the welfare effects of eliminating business cycles in a model with substantial consumer heterogeneity. The heterogeneity arises from uninsurable and idiosyncratic uncertainty in preferences and employment, where, regarding employment, we distinguish among employment and shortand long-term unemployment. We calibrate the model to match the distribution of wealth in U.S. data and fe...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- J. UCS
دوره 14 شماره
صفحات -
تاریخ انتشار 2008